is it possible to get the X & Y co-ordinates of an anchor \ image in Javascript ???
hey..
i`m looking for a peice of code to get the X & Y co-ords of an image or Anchor in Javascript, i figuire its got to be possible.. i`m just not entirely sure how.. if anyone could help me out here it would be much appreciated http://www.devshed.com/Talk/Forums/smile.gif
Apoc
Yes, you can! I have an example at http://www.sitesuwant.com/exampleXY.html. (http://www.sitesuwant.com/exampleXY.html) You can get the x and y of an image with this code inside the script tag:
...and that should give you the proper response. This will only work in Internet Explorer 3+ I believe, so if you want Netscape too, tell me and I'll try to figure something out in Javascript for Netscape...